package com.jet.chat.db;

import com.jet.chat.exception.ChatExceptionDBService;
import com.jet.chat.service.DBService;


public class ChatUsersCreate {

	public static void main(String[] args) {
		DBService dbService = new DBService("chatdb");
		try {
			dbService.createConnection();
			dbService.execUPD("create table users (id int primary key not null, username varchar(20), password varchar(20))");
			dbService.execUPD("insert into users (id, username, password) values (1, 'alisa', 'tao')");
			dbService.execUPD("insert into users (id, username, password) values (2, '1', '1')");
			dbService.execUPD("insert into users (id, username, password) values (3, '2', '2')");
			dbService.execUPD("insert into users (id, username, password) values (4, '3', '3')");
			dbService.shutdown();
		} catch (ChatExceptionDBService e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}
